package com.ruoyi.supervise.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.supervise.domain.BaseProjectInfo;
import com.ruoyi.supervise.domain.ProjectArchivesBaseInfo;
import com.ruoyi.supervise.domain.UnitEngineeringInfoTable;
import com.ruoyi.supervise.mapper.ProjectArchivesBaseInfoMapper;
import com.ruoyi.supervise.service.IProjectArchivesBaseInfoService;
import com.ruoyi.supervise.util.FieldStrUtils;

/**
 * @ClassName: IProjectArchivesBaseInfoServiceImpl
 * @Description: 点击项目名称进入的页面的基本信息Service 
 * @Author wtj
 * @DateTime 2020年3月11日 下午4:27:24
 */
@Service
@DataSource(value = DataSourceType.SLAVE)
public class IProjectArchivesBaseInfoServiceImpl implements IProjectArchivesBaseInfoService 
{
    @Autowired
    private ProjectArchivesBaseInfoMapper projectArchivesBaseInfoMapper;

	@Override
	public BaseProjectInfo selectProjectArchivesBaseInfoByGuid(BaseProjectInfo projectArchivesBaseInfo) {
		BaseProjectInfo pabi=projectArchivesBaseInfoMapper.selectProjectArchivesBaseInfoByGuid(projectArchivesBaseInfo);
		pabi.setLicenseNumImage(FieldStrUtils.fileFieldThreePara(pabi.getLicenseNumImage(), 4, 1));
		pabi.setApprovalNumImage(FieldStrUtils.fileFieldThreePara(pabi.getApprovalNumImage(), 4, 1));
		pabi.setConstructUnitGuid(FieldStrUtils.personOrEnterFieldParaNot(pabi.getConstructUnitId(),2,0));
		pabi.setConstructUnitName(FieldStrUtils.personOrEnterFieldParaNot(pabi.getConstructUnitId(),2,1));
		return pabi;
	}

	@Override
	public List<UnitEngineeringInfoTable> selectUnitEngineeringInfoTableFJList(
			UnitEngineeringInfoTable unitEngineeringInfoTable) {
		// TODO Auto-generated method stub
		return projectArchivesBaseInfoMapper.selectUnitEngineeringInfoTableFJList(unitEngineeringInfoTable);
	}

	@Override
	public List<UnitEngineeringInfoTable> selectUnitEngineeringInfoTableSZList(
			UnitEngineeringInfoTable unitEngineeringInfoTable) {
		// TODO Auto-generated method stub
		return projectArchivesBaseInfoMapper.selectUnitEngineeringInfoTableSZList(unitEngineeringInfoTable);
	}

    

    
}
